package com.example.config;

import com.example.entry.HeaderEntry;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;


public class GlobalConfig {
    private static GlobalConfig instance;
    private final ObservableList<HeaderEntry> globalHeaders = FXCollections.observableArrayList();
    private final ObservableList<HeaderEntry> globalCookies = FXCollections.observableArrayList();

    private GlobalConfig() {}

    public static GlobalConfig getInstance() {
        if (instance == null) {
            instance = new GlobalConfig();
        }
        return instance;
    }

    public static void setInstance(GlobalConfig instance) {
        GlobalConfig.instance = instance;
    }

    public ObservableList<HeaderEntry> getGlobalHeaders() {
        return globalHeaders;
    }

    public ObservableList<HeaderEntry> getGlobalCookies() {
        return globalCookies;
    }
}
